<layout name="layout" />

<script src="{$uri}Public/Scripts/PSI/PurchaseRej/PRMainForm.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/PurchaseRej/PREditForm.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/PurchaseRej/PRSelectPWBillForm.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/Warehouse/WarehouseField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/User/UserField.js?dt={$dtFlag}" type="text/javascript"></script>
<script src="{$uri}Public/Scripts/PSI/Supplier/SupplierField.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/Goods/GoodsField.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Scripts/PSI/UX/CellEditing.js?dt={$dtFlag}" type="text/javascript"></script>

<script src="{$uri}Public/Lodop/LodopFuncs.js?dt={$dtFlag}" type="text/javascript"></script>

<script>
  Ext.onReady(function () {
    var app = Ext.create("PSI.App", {
      userName: "{$loginUserName}",
      productionName: "{$productionName}"
    });

    var permission = {
      add: "{$pAdd}",
      edit: "{$pEdit}",
      del: "{$pDelete}",
      commit: "{$pCommit}",
      genPDF: "{$pGenPDF}",
      print: "{$pPrint}"
    };

    app.add(Ext.create("PSI.PurchaseRej.PRMainForm", {
      permission: permission
    }));
    app.setAppHeader({
      title: "{$title}",
      iconCls: "PSI-fid2007"
    });
  });
</script>
